package com.Person;

/**
 * ClassName: Student
 * Package:
 * Description:
 *
 * @Author 软件232班——欧阳昊淼
 * @Create 2024/9/4 15:42
 * @Version 17.0.2
 */
public class Student extends Person {
    private int no;
    private double scoreEn;
    private double scoreMath;
    private double  scoreCh ;

    public Student() {

    }
    public Student(int no, double scoreEn, double scoreMath, double  scoreCh) {
        this.no = no;
        this.scoreEn = scoreEn;
        this.scoreMath = scoreMath;
        this.scoreCh = scoreCh;
    }
    public int getNo() {
        return no;
    }
    public void setNo(int no) {
        this.no = no;
    }
    public double getScoreEn() {
        return scoreEn;
    }
    public void setScoreEn(double scoreEn) {
        this.scoreEn = scoreEn;
    }
    public double getScoreMath() {
        return scoreMath;
    }
    public void setScoreMath(double scoreMath) {
        this.scoreMath = scoreMath;
    }
    public double getScoreCh() {
        return scoreCh;
    }
    public void setScoreCh(double scoreCh) {
        this.scoreCh = scoreCh;
    }

  /*  public boolean Aver(){
        double aver = (getScoreEn()+getScoreMath()+getScoreCh())/3;
        return aver>0.5;
    }*/

    public double Max() {
        double max;
        return max = Math.max(scoreEn, scoreMath);
    }
    public double Min() {
        double min;
        return min = Math.min(scoreEn, scoreMath);
    }

    @Override
    public String toString() {
        return "Student{" +
                "no=" + no +
                ", scoreEn=" + scoreEn +
                ", scoreMath=" + scoreMath +
                ", scoreCh=" + scoreCh +
                '}';
    }


}
